<?php
$id=intval($_GET['id']);
$sub=video_get_category($id);
$cat=video_get_category($sub['main']['parent'],$id);
$cache=new cache;
	$og_url=HOME."video/s$id/".$cat['main']['alias']."/";
	//-------------------------- GET TRUYEN ----------------
    $sql ="SELECT * from blog_video where subcategory=$id and status=1 order by id desc ";
	$sql2="SELECT id from blog_video where  subcategory=$id and status=1";

	$pager = new Pagination($sql, 20, 5,$og_url,500);
	$pager->setDebug(false);
	$cache=new cache;
	$data[info] = $pager->paginate($cache,$sql2);
	$data[nav]	= $pager->renderFullNav();
	
	

			$data1[title]=web_title($cat['sub']['seo_title']);
			$data1['mota']=web_des($cat['sub']['seo_description']);
			$data1['keyword']=web_keyword($cat['sub']['seo_keyword']);
$data['category']=$cat;			

loadview('template/header_video',$data1);
loadview("video/category",$data);
loadview('template/footer_video');
exit();